This page last changed on May 31, 2006 by tcarlson.

The Mule resource adapter enables a mule instance to be deployed to a J2EE application server. It can be deployed to any JCA 1.5 compliant container, see J2EE Application Servers for more information about specific App Server configurations.

The Resource Adapter can be downloaded here.

EJB configuration

The resource adapter supports inbound and outbound communication.

Outbound Bean Configuration

<session>
    <description>A stateless session bean that sends a message over a mule transport 
    </description>
    <display-name>SenderEJB</display-name>
    <ejb-name>SenderEJB</ejb-name>
    <home>org.mule.samples.ejb.SenderHome</home>
    <remote>org.mule.samples.ejb.Sender</remote>
    <ejb-class>org.mule.samples.ejb.SenderBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    <resource-ref>
        <res-ref-name>mule/connectionFactory</res-ref-name>
        <res-type>org.mule.ra.MuleConnectionFactory</res-type>
        <res-auth>Container</res-auth>
        <res-sharing-scope>Unshareable</res-sharing-scope>
    </resource-ref>
</session>

Inbound Configuration

the only required property for for your MDB is 'endpoint' is a valid endpoint Uri to receive Mule events.

<message-driven>
    <description>An MDB listening a Tcp socket</description>
    <display-name>TcpReceiverMDB</display-name>
    <ejb-name>TcpReceiverMDB</ejb-name>
    <ejb-class>org.mule.samples.ejb.SimpleReceiverMessageBean</ejb-class>
    <messaging-type>org.mule.umo.lifecycle.Callable</messaging-type>
    <transaction-type>Container</transaction-type>
    <activation-config>
        <activation-config-property>
           <activation-config-property-name>endpoint</activation-config-property-name>
           <activation-config-property-value>tcp://localhost:12345
           </activation-config-property-value>
        </activation-config-property>
     </activation-config>
</message-driven>
Document generated by Confluence on Nov 27, 2006 10:27